<!DOCTYPE html><html lang="zh-CN" data-theme="dark"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>计网复习 | SodaSoda</title><meta name="author" content="ShiMH"><meta name="copyright" content="ShiMH"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#0d0d0d"><meta name="description" content="第一章  概述 计算机网络的作用 目的 功能：数据通信 资源共享  世界上第一个计算机网络：ARPANET 阿帕网  三网合一：电信网络、有线电视、计算机网络  网络协议的三要素：语法 语义 同步（时序）  分类：LAN局域网   MAN城域网   WAN广域网 ​			（广播）                               （点对点）   第二章   网络模型(协议 设备  功能)">
<meta property="og:type" content="article">
<meta property="og:title" content="计网复习">
<meta property="og:url" content="https://soda124.gitee.io/articles/1be102e0.html">
<meta property="og:site_name" content="SodaSoda">
<meta property="og:description" content="第一章  概述 计算机网络的作用 目的 功能：数据通信 资源共享  世界上第一个计算机网络：ARPANET 阿帕网  三网合一：电信网络、有线电视、计算机网络  网络协议的三要素：语法 语义 同步（时序）  分类：LAN局域网   MAN城域网   WAN广域网 ​			（广播）                               （点对点）   第二章   网络模型(协议 设备  功能)">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://soda124.gitee.io/img/star.jpeg">
<meta property="article:published_time" content="2022-06-20T14:35:14.000Z">
<meta property="article:modified_time" content="2022-06-30T08:24:09.647Z">
<meta property="article:author" content="ShiMH">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://soda124.gitee.io/img/star.jpeg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://soda124.gitee.io/articles/1be102e0"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '计网复习',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2022-06-30 16:24:09'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="/css/universe.css"><link rel="stylesheet" href="/css/custom.css"><!-- hexo injector head_end start --><link rel="stylesheet" href="https://unpkg.zhimg.com/hexo-butterfly-clock/lib/clock.min.css" /><!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.2.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="wizard-scene"><div class="wizard-objects"><div class="wizard-square"></div><div class="wizard-circle"></div><div class="wizard-triangle"></div></div><div class="wizard"><div class="wizard-body"></div><div class="wizard-right-arm"><div class="wizard-right-hand"></div></div><div class="wizard-left-arm"><div class="wizard-left-hand"></div></div><div class="wizard-head"><div class="wizard-beard"></div><div class="wizard-face"><div class="wizard-adds"></div></div><div class="wizard-hat"><div class="wizard-hat-of-the-hat"></div><div class="wizard-four-point-star --first"></div><div class="wizard-four-point-star --second"></div><div class="wizard-four-point-star --third"></div></div></div></div></div></div><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "/img/cat-loading.gif" data-lazy-src="/img/profileIcon.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">9</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">0</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">5</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fa fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fa fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fa fa-sitemap"></i><span> 菜单</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('/img/star.jpeg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">SodaSoda</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fa fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fa fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fa fa-sitemap"></i><span> 菜单</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">计网复习</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-06-20T14:35:14.000Z" title="发表于 2022-06-20 22:35:14">2022-06-20</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-06-30T08:24:09.647Z" title="更新于 2022-06-30 16:24:09">2022-06-30</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/">基础知识</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">1.3k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>4分钟</span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h2 id="第一章-概述"><a href="#第一章-概述" class="headerlink" title="第一章  概述"></a>第一章  概述</h2><ol>
<li><p>计算机网络的作用 目的 功能：<strong>数据通信 资源共享</strong></p>
</li>
<li><p>世界上第一个计算机网络：ARPANET 阿帕网</p>
</li>
<li><p>三网合一：电信网络、有线电视、计算机网络</p>
</li>
<li><p>网络协议的三要素：语法 语义 同步（时序）</p>
</li>
<li><p>分类：LAN局域网   MAN城域网   WAN广域网</p>
<p>​			（广播）                               （点对点）</p>
</li>
</ol>
<h2 id="第二章-网络模型-协议-设备-功能"><a href="#第二章-网络模型-协议-设备-功能" class="headerlink" title="第二章   网络模型(协议 设备  功能)"></a>第二章   网络模型(协议 设备  功能)</h2><ol>
<li><p>OSI 模型：开放式互联参考模型</p>
<p>应用层：离用户最近  协议（FTP&#x2F;DNS&#x2F;HTTP&#x2F;HTTPS&#x2F;TELNET&#x2F;TFTP&#x2F;SMTP&#x2F;SNMP)</p>
<p>表示层：格式编码  加密解密  压缩解压缩</p>
<p>会话层：保持会话</p>
<p>传输层：实现端到端的连接   TCP(可靠的连接）  UDP(不可靠连接）</p>
<p>网络层：协议(IP&#x2F;ARP&#x2F;ICMP&#x2F;IGMP&#x2F;RARP)   物理设备（路由器、三层交换机）   交换寻址选路   IP地址</p>
<p>数据链路层：物理设备（交换机、网桥、网卡）  MAC地址</p>
<p>物理层：物理设备（中继器、集线器、网卡）  介质（同轴电缆、双绞线、光纤）</p>
</li>
<li><p>TCP&#x2F;IP模型</p>
<p>应用层：</p>
<p>传输层：</p>
<p>网络层：</p>
<p>网际层：</p>
</li>
</ol>
<h2 id="第三章CRC公式-循环冗余码"><a href="#第三章CRC公式-循环冗余码" class="headerlink" title="第三章	CRC公式  循环冗余码"></a>第三章	CRC公式  循环冗余码</h2><ol>
<li><p>根据多项式确定除数，根据生成多项式的最高阶向信息位补0–101001000</p>
</li>
<li><p>补0后的信息位与除数进行异或运算，得到余数</p>
</li>
<li><p>将余数补全，放在原信息位后面</p>
</li>
</ol>
<p><img src= "/img/cat-loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/Monic1e/picb@master/imgForMD/image-20220620223110728.png" alt="image-20220620223110728"></p>
<h2 id="第四章IP地址"><a href="#第四章IP地址" class="headerlink" title="第四章	IP地址"></a>第四章	IP地址</h2><p>32位二进制    8x4</p>
<ol>
<li>A类IP  8位网络号码  24位主机号码		1.0.0.1到127.255.255.254</li>
<li>B类IP  16位网络号码  16位主机号码      128.0.0.1到191.255.255.254</li>
<li>C类IP  24位网络号码  8位主机号码         192.0.0.1到223.255.255.254</li>
<li>D   组播       224-239</li>
<li>E    保留       240-255</li>
</ol>
<p>特殊IP地址</p>
<ol>
<li>A类：10.0.0.0到10.255.255.255</li>
<li>B类：172.16.0.0到172.31.255.255</li>
<li>C类：192.168.0.0到192.168.255.255</li>
<li>当前主机：0.0.0.0</li>
<li>局域网广播地址255.255.255.255</li>
<li>本机地址：127.0.0.1</li>
</ol>
<h2 id="第五章-子网划分"><a href="#第五章-子网划分" class="headerlink" title="第五章    子网划分"></a>第五章    子网划分</h2><p>网络号不变，借用主机号来产生新的网络</p>
<p><img src= "/img/cat-loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/Monic1e/picb@master/imgForMD/image-20220620223139859.png" alt="image-20220620223139859"></p>
<p><img src= "/img/cat-loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/Monic1e/picb@master/imgForMD/image-20220620223150990.png" alt="image-20220620223150990"></p>
<p><img src= "/img/cat-loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/Monic1e/picb@master/imgForMD/image-20220620223207651.png" alt="image-20220620223207651"></p>
<h2 id="第六章-路由-路由协议"><a href="#第六章-路由-路由协议" class="headerlink" title="第六章  路由 路由协议"></a>第六章  路由 路由协议</h2><ol>
<li><p>直连路由   优先级：0      计算机与交换机直连</p>
</li>
<li><p>静态路由   优先级：60      指定某一线路进行通信</p>
</li>
<li><p>动态路由   RIP：基于距离，最大15    优先级：100</p>
<p>​                  OPSF：基于链路状态，无距离限制    优先级：10</p>
</li>
<li><p>默认路由   当不指定静态路由和动态路由时的默认路径</p>
</li>
</ol>
<h2 id="第七章-TCP的三次握手四次分手"><a href="#第七章-TCP的三次握手四次分手" class="headerlink" title="第七章 TCP的三次握手四次分手"></a>第七章 TCP的三次握手四次分手</h2><p>TCP头部：URG（紧急）</p>
<p>​                   ARC（确认）</p>
<p>​				   PSH（推送）</p>
<p>​				   RST（重置）</p>
<p>​				   SYN（同步）</p>
<p>​				   FIN（释放）</p>
<img src= "/img/cat-loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/Monic1e/picb@master/imgForMD/image-20220620223224147.png" alt="image-20220620223224147" style="zoom: 50%;" />

<img src= "/img/cat-loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/Monic1e/picb@master/imgForMD/image-20220620223248943.png" alt="image-20220620223248943" style="zoom: 50%;" />

<h2 id="第八章-TCP-UDP"><a href="#第八章-TCP-UDP" class="headerlink" title="第八章 TCP UDP"></a>第八章 TCP UDP</h2><ol>
<li><p>TCP : 可靠的传输方式   有连接    超时重发与流量控制    只支持一对一单播</p>
<p>​		适用于高安全环境</p>
</li>
<li><p>UDP : 不可靠的传输方式   无连接     无可靠性保障    可以单播多播广播</p>
<p>​		适用于速度快，安全性要求不高</p>
</li>
</ol>
<p>​	相同点：都是传输层，都需要打开服务端口</p>
<h2 id="第九章-补充知识点"><a href="#第九章-补充知识点" class="headerlink" title="第九章 补充知识点"></a>第九章 补充知识点</h2><ol>
<li>服务端口号</li>
</ol>
<p>​		数据端口（主动模式）	20</p>
<p>​		控制端口							21</p>
<p>​		TELNET远程登录			  23</p>
<p>​		SMTP简单邮件传输		  25</p>
<p>​		DNS域名服务					53</p>
<p>​		TFTP简单文件传输			69</p>
<p>​		HTTP超文本传输				80</p>
<p>​		SNMP简单网络管理			161</p>
<p>​		HTTPS超文本传输（安全）443</p>
<ol start="2">
<li>VLAN技术 虚拟局域网   功能：隔离广播域</li>
</ol>
<p>​			基于端口划分</p>
<p>​			基于MAC划分</p>
<p>​			基于IP子网划分</p>
<p>​			基于协议划分</p>
<p>​			基于策略划分</p>
<ol start="3">
<li>STP   生成树协议   功能：防止环生成   环→树</li>
</ol>
<p><img src= "/img/cat-loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/Monic1e/picb@master/imgForMD/image-20220620223302346.png" alt="image-20220620223302346"></p>
<p>​		RSTP   快速生成树</p>
<p>​		MSTP   多生成树</p>
<ol start="4">
<li><p>电路交换   需要建立连接    速度慢但可靠安全</p>
<p>分组交换&#x2F;报文交换   不需要建立连接</p>
</li>
<li><p>CSMA&#x2F;CD   在共享链路上避免冲突</p>
<pre><code>先听，再发     边发边听     冲突停发    随机延迟再发
</code></pre>
</li>
</ol>
<img src= "/img/cat-loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/Monic1e/picb@master/imgForMD/image-20220620223318307.png" alt="image-20220620223318307" style="zoom: 67%;" />

<ol start="6">
<li><p>MAC地址  每个主机唯一   6字节    前3字节由组织颁发   后3位厂商颁发</p>
</li>
<li><p>域名</p>
<p><a target="_blank" rel="noopener" href="http://www.baidu.com/">www.baidu.com</a></p>
<p>三级   二级   顶级</p>
</li>
</ol>
<h3 id="层次结构的要点："><a href="#层次结构的要点：" class="headerlink" title="层次结构的要点："></a>层次结构的要点：</h3><pre><code>     1) 除了在物理媒体上进行的是实通信之外，其余各对等实体间进行的都是虚通信。
              2) 对等层的虚通信必须遵循该层的协议。
              3) n 层的虚通信是通过 n / n-1层间接口处 n-1 层提供的服务以及 n-1 层的通信（通常也是虚通信）来实现的。
</code></pre>
<h3 id="层次结构划分的原则："><a href="#层次结构划分的原则：" class="headerlink" title="层次结构划分的原则："></a>层次结构划分的原则：</h3><pre><code>    1) 每层的功能应是明确的，并且是相互独立的。当某一层的具体实现方法更新时，只要保持上、下层的接口不变，便不会对邻居产生影响。
    2) 层间接口必须清晰，跨越接口的信息量应尽可能少。
    3) 层数应适中。若层数太少，则造成每一层的协议太复杂；若层数太多，则体系结构过于复杂，使描述和实现各层功能变得困难。
</code></pre>
<img src= "/img/cat-loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/Monic1e/picb@master/imgForMD/image-20220620223402115.png" alt="image-20220620223402115" style="zoom:67%;" />

<p><img src= "/img/cat-loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/Monic1e/picb@master/imgForMD/image-20220620223418818.png" alt="image-20220620223418818"></p>
<img src= "/img/cat-loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/Monic1e/picb@master/imgForMD/image-20220620223433437.png" alt="image-20220620223433437" style="zoom:67%;" />









</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="https://soda124.gitee.io">ShiMH</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://soda124.gitee.io/articles/1be102e0.html">https://soda124.gitee.io/articles/1be102e0.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://soda124.gitee.io" target="_blank">SodaSoda</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"></div><div class="post_share"><div class="social-share" data-image="/img/star.jpeg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/gh/overtrue/share.js@master/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-full"><a href="/articles/cf0854e3.html"><img class="prev-cover" src= "/img/cat-loading.gif" data-lazy-src="/img/star.jpeg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">面试题--Redis</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src= "/img/cat-loading.gif" data-lazy-src="/img/profileIcon.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">ShiMH</div><div class="author-info__description">未完待续</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">9</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">0</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">5</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="mailto:xxxxxx@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">来日方长</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AC%AC%E4%B8%80%E7%AB%A0-%E6%A6%82%E8%BF%B0"><span class="toc-number">1.</span> <span class="toc-text">第一章  概述</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AC%AC%E4%BA%8C%E7%AB%A0-%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B-%E5%8D%8F%E8%AE%AE-%E8%AE%BE%E5%A4%87-%E5%8A%9F%E8%83%BD"><span class="toc-number">2.</span> <span class="toc-text">第二章   网络模型(协议 设备  功能)</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AC%AC%E4%B8%89%E7%AB%A0CRC%E5%85%AC%E5%BC%8F-%E5%BE%AA%E7%8E%AF%E5%86%97%E4%BD%99%E7%A0%81"><span class="toc-number">3.</span> <span class="toc-text">第三章	CRC公式  循环冗余码</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AC%AC%E5%9B%9B%E7%AB%A0IP%E5%9C%B0%E5%9D%80"><span class="toc-number">4.</span> <span class="toc-text">第四章	IP地址</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AC%AC%E4%BA%94%E7%AB%A0-%E5%AD%90%E7%BD%91%E5%88%92%E5%88%86"><span class="toc-number">5.</span> <span class="toc-text">第五章    子网划分</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AC%AC%E5%85%AD%E7%AB%A0-%E8%B7%AF%E7%94%B1-%E8%B7%AF%E7%94%B1%E5%8D%8F%E8%AE%AE"><span class="toc-number">6.</span> <span class="toc-text">第六章  路由 路由协议</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AC%AC%E4%B8%83%E7%AB%A0-TCP%E7%9A%84%E4%B8%89%E6%AC%A1%E6%8F%A1%E6%89%8B%E5%9B%9B%E6%AC%A1%E5%88%86%E6%89%8B"><span class="toc-number">7.</span> <span class="toc-text">第七章 TCP的三次握手四次分手</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AC%AC%E5%85%AB%E7%AB%A0-TCP-UDP"><span class="toc-number">8.</span> <span class="toc-text">第八章 TCP UDP</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AC%AC%E4%B9%9D%E7%AB%A0-%E8%A1%A5%E5%85%85%E7%9F%A5%E8%AF%86%E7%82%B9"><span class="toc-number">9.</span> <span class="toc-text">第九章 补充知识点</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%B1%82%E6%AC%A1%E7%BB%93%E6%9E%84%E7%9A%84%E8%A6%81%E7%82%B9%EF%BC%9A"><span class="toc-number">9.1.</span> <span class="toc-text">层次结构的要点：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%B1%82%E6%AC%A1%E7%BB%93%E6%9E%84%E5%88%92%E5%88%86%E7%9A%84%E5%8E%9F%E5%88%99%EF%BC%9A"><span class="toc-number">9.2.</span> <span class="toc-text">层次结构划分的原则：</span></a></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/articles/b8631032.html" title="信息加解密">信息加解密</a><time datetime="2022-08-26T00:00:00.000Z" title="发表于 2022-08-26 08:00:00">2022-08-26</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/articles/f119c603.html" title="AOP面向切面编程">AOP面向切面编程</a><time datetime="2022-08-25T09:06:00.000Z" title="发表于 2022-08-25 17:06:00">2022-08-25</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/articles/e1945976.html" title="Vue--父子传值">Vue--父子传值</a><time datetime="2022-07-28T04:30:00.000Z" title="发表于 2022-07-28 12:30:00">2022-07-28</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/articles/40393ae2.html" title="面试题--Java算法">面试题--Java算法</a><time datetime="2022-07-28T04:00:00.000Z" title="发表于 2022-07-28 12:00:00">2022-07-28</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/articles/b7aade44.html" title="面试题--MySQL">面试题--MySQL</a><time datetime="2022-06-21T00:31:16.000Z" title="发表于 2022-06-21 08:31:16">2022-06-21</time></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('/img/star.jpeg')"><div id="footer-wrap"><div class="copyright">&copy;2022  <i id="heartbeat" class="fa fas fa-heartbeat"></i> ShiMH</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div><link rel="stylesheet" href="https://fastly.jsdelivr.net/gh/HCLonely/images@master/others/heartbeat.min.css"></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script async="async">var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').style.transition = 'opacity 3s ease 0s'
    document.getElementById('loading-box').style.opacity = '0'
    setTimeout(function(){
      document.getElementById('loading-box').classList.add("loaded")
    }, 3000);
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').style.transition = '';
    document.getElementById('loading-box').style.opacity = '1'
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',()=> {preloader.endLoading()})
setTimeout(function(){preloader.endLoading();}, 3000);</script><div class="js-pjax"></div><canvas id="universe"></canvas><script defer src="/js/universe.js"></script><script defer src="/js/heart.js"></script><script id="click-heart" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-heart.min.js" async="async" mobile="false"></script><script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script><script>let pjaxSelectors = ["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"]

var pjax = new Pjax({
  elements: 'a:not([target="_blank"])',
  selectors: pjaxSelectors,
  cacheBust: false,
  analytics: false,
  scrollRestoration: false
})

document.addEventListener('pjax:send', function () {

  // removeEventListener scroll 
  window.tocScrollFn && window.removeEventListener('scroll', window.tocScrollFn)
  window.scrollCollect && window.removeEventListener('scroll', scrollCollect)

  typeof preloader === 'object' && preloader.initLoading()
  document.getElementById('rightside').style.cssText = "opacity: ''; transform: ''"
  
  if (window.aplayers) {
    for (let i = 0; i < window.aplayers.length; i++) {
      if (!window.aplayers[i].options.fixed) {
        window.aplayers[i].destroy()
      }
    }
  }

  typeof typed === 'object' && typed.destroy()

  //reset readmode
  const $bodyClassList = document.body.classList
  $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')

})

document.addEventListener('pjax:complete', function () {
  window.refreshFn()

  document.querySelectorAll('script[data-pjax]').forEach(item => {
    const newScript = document.createElement('script')
    const content = item.text || item.textContent || item.innerHTML || ""
    Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
    newScript.appendChild(document.createTextNode(content))
    item.parentNode.replaceChild(newScript, item)
  })

  GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()

  typeof chatBtnFn === 'function' && chatBtnFn()
  typeof panguInit === 'function' && panguInit()

  // google analytics
  typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});

  // baidu analytics
  typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);

  typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()

  // prismjs
  typeof Prism === 'object' && Prism.highlightAll()

  typeof preloader === 'object' && preloader.endLoading()
})

document.addEventListener('pjax:error', (e) => {
  if (e.request.status === 404) {
    pjax.loadUrl('/404.html')
  }
})</script></div><!-- hexo injector body_end start --><script data-pjax>
  function butterfly_clock_injector_config(){
    var parent_div_git = document.getElementsByClassName('sticky_layout')[0];
    var item_html = '<div class="card-widget card-clock"><div class="card-glass"><div class="card-background"><div class="card-content"><div id="hexo_electric_clock"><img class="entered loading" id="card-clock-loading" src= "/img/cat-loading.gif" data-lazy-src="https://github.com/Monic1e/picb/tree/master/loading.gif" style="height: 120px; width: 100%;" data-ll-status="loading"/></div></div></div></div></div>';
    console.log('已挂载butterfly_clock')
    parent_div_git.insertAdjacentHTML("afterbegin",item_html)
    }
  var elist = 'null'.split(',');
  var cpage = location.pathname;
  var epage = 'all';
  var flag = 0;

  for (var i=0;i<elist.length;i++){
    if (cpage.includes(elist[i])){
      flag++;
    }
  }

  if ((epage ==='all')&&(flag == 0)){
    butterfly_clock_injector_config();
  }
  else if (epage === cpage){
    butterfly_clock_injector_config();
  }
  </script><script src="https://pv.sohu.com/cityjson?ie=utf-8"></script><script data-pjax src="https://unpkg.zhimg.com/hexo-butterfly-clock/lib/clock.min.js"></script><!-- hexo injector body_end end --></body></html>